package cn.edu.scau.cmi.chenruilin.adapter;

import java.util.Comparator;
import java.util.List;

public class SortUtil {
	public List sortInt(List<Integer> intList) {
		int index = 0;
		for(int i = 0; i < intList.size(); i++) {
			for(int j = 0; j < intList.size()-1-i; j++) {
				int a = intList.get(j);
				int b = intList.get(j+1);
				//System.out.println(a);
				//System.out.println(b);
				if(a > b) {
					intList.set(j, b);
					intList.set(j+1, a);
				}
			}
		}
		//intList.sort(Comparator.naturalOrder());
		return intList;
	}
}
